<?php
$this->pageTitle = t('PAGE_TITLE', 'history');
$this->pageHeader = t('PAGE_TITLE', 'history') . ' Hồ sơ: <span class="fullname">' . Html::encode($profileModel->full_name) . '</span>';
$toolbar = new LGToolbar();
//$toolbar->buttonDelete();
$toolbar->Cancel('btnCancel',t('BTN_CANCEL'),url('/profile/index'));
$toolbar->buttonRefresh('Làm mới trang', 'Làm mới trang',url('/history/profile', array('id'=>$profileModel->id, 'alias'=>stringURLSafe($profileModel->full_name))));
$this->pageToolbar = $toolbar->mergeToolbar();
?>

<!-- search-form -->                                
<div class="search-form"> 														
<?php
$this->renderPartial('_search', array(
    'model' => $model, 'profileModel' => $profileModel,
));
?>
</div>

<!-- grid -->
<?php
$this->widget('GridView', array(
'id' => 'DataGrid',
'dataProvider' => $model->getHistoryByProfileId($profileModel->id),
'itemsCssClass' => 'grid',
'summaryText' => LGHelpers::getSummary(),
'columns' => array(
    array(
	'header' => '#',
	'class' => 'CCheckBoxColumn',
	'selectableRows' => '2',
	'htmlOptions' => array('width' => '10px', 'style' => 'text-align:center'),
	'id' => 'chkId',
    ),
    array(
	'name' => 'field_name',
	'value' => 'CHtml::encode($data->field_name)',
	'htmlOptions' => array('width' => '120px'),
	'type' => 'raw',
    ),
	array(
	'name' => 'old_value',
	'value' => '$data->old_value',
	'htmlOptions' => array('width' => '114px', 'align' => 'center'),
	),
        array(
	'name' => 'new_value',
	'value' => '$data->new_value',
	'htmlOptions' => array('width' => '114px', 'align' => 'center'),
    ),
    array(
	'name' => 'updated_by',
	'value' => 'CHtml::encode($data->updated_by)',
	'header' => t('LBL_UPDATED_BY', 'province'),
	'type' => 'raw',
	'htmlOptions' => array('width' => '100px', 'style' => 'text-align:center'),
    ),
        array(
	'name' => 'update_date',
	'value' => '$data->update_date',
	'htmlOptions' => array('width' => '120px', 'style' => 'text-align:center'),
	),
),
));
?>